package xy.web;

import java.util.HashMap;
import java.util.Map;

public class Actions {
	public static void putActionItem(ActionItem item) throws Exception {
		if (item.getActionId().indexOf("-") != -1
				||item.getActionId().indexOf(".") != -1) {
			throw new Exception("actionId can not contain '-', '.' ");
		}
		map.put(item.getActionId(), item);
	}

	public final static ActionItem getActionItem(String actionId) {
		return map.get(actionId);
	}

	protected static Map<String, ActionItem> map = new HashMap<String, ActionItem>();
}
